﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using PiscoSourDominio;
using System.ServiceModel.Web;

namespace PiscoSourRESTServices
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IUsuarios" in both code and config file together.
    [ServiceContract]
    public interface IUsuarios
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Usuarios", ResponseFormat = WebMessageFormat.Json)]
        List<Usuario> ListarUsuariosActivos();


        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "VUsuario/{codigo}/{pass}", ResponseFormat = WebMessageFormat.Json)]
        Usuario ValidarUsuario(string codigo, string pass);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "OUsuario/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        Usuario ObtenerUsuario(string codigo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "ListaUsuarios", ResponseFormat = WebMessageFormat.Json)]
        List<Usuario> ListaUsuarios();
    }
}
